package com.viknix.threadpool.manager.client.util;

import java.io.InputStream;
import java.util.Properties;

/**
 * @Author: Dongqi
 * @Date: 2021/11/24 10:01
 * @Version 1.0
 * @Description:
 */
public class VersionUtils {

    public static String VERSION;
    public static final String VERSION_DEFAULT = "${project.version}";

    public VersionUtils() {
    }

    static {
        InputStream in = null;

        try {
            in = VersionUtils.class.getClassLoader().getResourceAsStream("tpm-version.txt");
            Properties props = new Properties();
            props.load(in);
            String val = props.getProperty("version");
            if (val != null && !"@project.version@".equals(val)) {
                VERSION = val;
            }
        } catch (Exception var11) {
            var11.printStackTrace();
        } finally {
            try {
                if (in != null) {
                    in.close();
                }
            } catch (Exception var10) {
                var10.printStackTrace();
            }

        }
    }
}
